#ifndef RESISTANCE_H
#define RESISTANCE_H

class resistance
{
public:
    resistance(double r_value, double r_error, double r_power = 0.1);
    resistance(double r_value, double r_error, double r_power, double tcr, double acr);
    ~resistance(void);

    // 设置电阻参数
    void set_value(double r_value);
    void set_error(double r_error);
    void set_power(double r_power);
    void set_tcr(double r_tcr);
    void set_acr(double r_acr);

    // 获取电阻参数
    double get_value(void);
    double get_error(void);
    double get_power(void);

    // 计算电阻参数
    double get_max_value(double max_work_temperature, unsigned int max_work_life);
    double get_min_value(double max_work_temperature, unsigned int max_work_life);


private:
    double value;
    double error;
    double power;

    double tcr; // 温度系数
    double acr; // 老化系数
};



#endif // RESISTANCE_H
